﻿#pragma once
#include "yzrutil.h"
#include "array/Array.hpp"

namespace yzrilyzr_io{
	EBCLASS(InputStream){
	protected:
	u_index readCounter=0;
	static constexpr u_index MAX_SKIP_BUFFER_SIZE=2048;
	public:
	InputStream();
	virtual ~InputStream();
	virtual int32_t read()=0;
	virtual u_index read(yzrilyzr_array::ByteArray & b);
	virtual u_index read(yzrilyzr_array::ByteArray & b, u_index off, u_index len);
	virtual void reset();
	virtual bool markSupported();
	virtual void mark(u_index readlimit);
	virtual void close();
	virtual u_index available();
	virtual u_index skip(u_index n);
	};
}